<?php

namespace App\Entities;

class UserConvertibleCardEntity extends ABaseEntity
{
    public function __construct(UserConvertibleCardModel $model)
    {
        $this->model = $model;
    }

    /**
     * @return int
     */
    public function getId()
    {
        return (int)$this->model->id;
    }

    /**
     * 用户ID
     * @return int
     */
    public function getUserId()
    {
        return (int)$this->model->user_id;
    }

    /**
     * 用户ID
     * @param int $userId
     */
    public function setUserId(int $userId)
    {
        $this->model->user_id = $userId;
    }

    public function getCode()
    {
        return $this->model->code;
    }

    public function setCode($code)
    {
        $this->model->code = $code;
    }

    public function getConvertibleCardId()
    {
        return $this->model->convertible_card_id;
    }

    public function setConvertibleCardId($convertibleCardId)
    {
        $this->model->convertible_card_id = $convertibleCardId;
    }

    public function getExpireDate()
    {
        return $this->model->expire_date;
    }

    public function setExpireDate($expireDate)
    {
        $this->model->expire_date = $expireDate;
    }

    /**
     * 交易号
     * @return string
     */
    public function getTradeNo(): string
    {
        return $this->model->trade_no;
    }

    /**
     * 交易号
     * @param string $value
     */
    public function setTradeNo(string $value)
    {
        $this->model->trade_no = $value;
    }
}
